<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/include.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>记录类型列表</title>
<script type="text/javascript" src="/jquery/jquery-1.7.js"></script>
<script type="text/javascript">
	function back() {
		window.location.href = "${ctx}/record!selectList.action";
	}
	function selectType() {
		document.getElementsByName("record.typeId").value = typeId;
	}
</script>
</head>
<body>
	<div id="viewRecord">
		<form action="${ctx}/record!updateOrAddRecord.action">
			<div id="id">
				<input type="hidden" name="record.id" value="${record.id}">
			</div>

			<div id="typeStr">
				类型:<select name="record.typeId">
					<c:forEach items="${typelist}" var="type">
					
						<c:if test="${type.id==record.typeId}">
							<option value="${type.id}" selected="selected">${type.type}</option>
						</c:if>
						<option value="${type.id}">${type.type}</option>
					
					</c:forEach>
				</select>
			</div>
			<div id="cost">
				消费金额:<input type="text" name="record.cost" value="${record.cost}">
			</div>
			<div id="mark">
				消费说明:<input type="text" name="record.mark" value="${record.mark}">
			</div>
			<div id="createTime">
				<input type="hidden" name="record.createTime"
					value="${record.createTime}">
			</div>
			<div id="description">
				描述:<input type="text" name="record.description"
					value="${record.description}">
			</div>

			<div id="save">
				<input type="submit" value="保存">
			</div>

			<div id="back">
				<input type="button" value="返回" onclick="back()">
			</div>
		</form>
	</div>
<a href="${ctx}/main!backToIndex.action">返回到首页</a>
</body>
</html>
